#include <chassis_controller/odometry.h>
#include <chassis_controller/odometry_multi_pivots.h>
#include <chassis_controller/odometry_tricycle.h>
#include <chassis_controller/odometry_diff.h>
namespace chassis_controller
{
    Odometry *Odometry::create(std::shared_ptr<rclcpp_lifecycle::LifecycleNode> node, int chassis_type)
    {
        if (chassis_type == MULTI_PIVOTS)
        {
            Odometry *odometryPtr = new chassis_controller::MultiPivotsOdometry(node);
            return odometryPtr;
        }
        else if (chassis_type == DIFF)
        {
            Odometry *odometryPtr = new chassis_controller:: DiffOdometry(node);
            return odometryPtr;
        }
        else if (chassis_type == TRICYLE)
        {
            Odometry *odometryPtr = new chassis_controller:: TricycleOdometry(node);
            return odometryPtr;
        }
        return nullptr;
    }
}